require 'rubygems'
require 'hpricot'
require 'open-uri'

def scraper(site,name)
  result = ""
  
  doc = open(site){ |f| Hpricot(f)}
  result =  doc.search("//table[3]/tr[2]/td/table/tr/td[3]/table/tr/td/table[2]/tr[3]/td/table/tr[2]/td[3]/font/strong").to_html
#  image_url = /\.([^.]+)$/.match("UploadFiles/2008117174016141.jpg").values_at(0)
#  site_root = /(http:\/\/(.)+)(\/)/.match(site).values_at(0)

  return result
end

puts scraper("http://www.jasic.com.cn/ProductShow.asp?ID=73","/html/body/table[3]//tr[2]/td/table//tr/td[3]/table//tr/td/table[2]//tr[3]/td/table//tr[2]/td[3]/font/strong")

